using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FlexminAdmin.Forms
{
	public partial class VersionMismatchForm : Form
	{
		public VersionMismatchForm(Version thisVer, Version remoteVer)
		{
			InitializeComponent();

			downloadButton.Text = "Download from remote computer (version " + remoteVer.ToString() + ")";
			uploadButton.Text = "Upload to remote computer (version " + thisVer.ToString() + ")";

			if (thisVer > remoteVer)
			{
				uploadButton.Focus();
			}
			else
			{
				downloadButton.Focus();
			}
		}

		private void cancelButton_Click(object sender, EventArgs e)
		{
			DialogResult = DialogResult.Cancel;
			Close();
		}

		private void downloadButton_Click(object sender, EventArgs e)
		{
			DialogResult = DialogResult.Yes;
			Close();
		}

		private void uploadButton_Click(object sender, EventArgs e)
		{
			DialogResult = DialogResult.No;
			Close();
		}
	}
}